package com.study.portal.dao.impl;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.study.portal.dao.INavDao;
import com.study.portal.pojo.system.Nav;

public class NavDaoImpl extends SqlMapClientDaoSupport implements INavDao {

	@SuppressWarnings("unchecked")
	public List<Nav> select(Nav searchFrom) {
		if(null==searchFrom){
			return getSqlMapClientTemplate().queryForList("SELECT_ALL_NAV");
		}else{
			return getSqlMapClientTemplate().queryForList("SELECT_NAV", searchFrom);
		}
	}

	public Nav get(String id) {
		return (Nav)getSqlMapClientTemplate().queryForObject("GET_NAV", id);
	}

	public void insert(Nav nav) {
		getSqlMapClientTemplate().insert("INSERT_NAV", nav);
	}

	public void update(Nav nav) {
		getSqlMapClientTemplate().update("UPDATE_NAV", nav);
	}

	public void del(String id) {
		// TODO Auto-generated method stub

	}
}
